﻿using INTEX.DataBase;
using INTEX.DataBase.Tools;
using ReflectionStudio.Core.Events;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OracleClient;
using System.Linq;
using System.Windows;
namespace WPFExcelReport
{
    //
    public class YCAABAUDITData : BaseFunction
    {

        public ApplicationBase app
        {
            get
            {
                return ApplicationBase.Instance;
            }
        }
        public INTEXDBC INTEXDBC
        {
            get
            {
                return app.INTEXDBC;
            }
        }
        public INTEXBL INTEXBL
        {
            get
            {
                return app.INTEXBL;
            }
        }
        SETINTEXDB INTEXDB = new SETINTEXDB();
        public YCAABAUDITData()
            : base()
        {
            Helpers.Helper.GetDate(ref date, ref year, ref month, ref day);
        } 
    
        public DataSet BuildData(DataRow dwInput)
        {
            DataSet Result = new DataSet();
            DataSet Return = new DataSet();
            DataRow dwData = null;
            try
            {
                dwData = INTEXDB.ABPOS.NewRow();
                dwData["ABPMANDANT"] = dwInput["ABPMANDANT"];
                dwData["ABPAUFKRS"] = dwInput["ABPAUFKRS"];
                dwData["ABPAUFLFD"] = dwInput["ABPAUFLFD"];
                Result = INTEXDBC.QueryABPOS(dwData, 2);
                Return.Merge(Result);               
             
            }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex);
            }
            return Return;
        }       
    }
}